package com.xiuxiu.manage.back_manage.controller;

import com.xiuxiu.manage.back_manage.entity.User;
import com.xiuxiu.manage.back_manage.service.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class UserController {
    @Autowired
    private UserServer userServer;

    @RequestMapping(value = "/lists")
    public String selectUser(Model model){
        List<User> users=this.userServer.getUserList();
        model.addAttribute("user",users);
        return "forms";
    }

}
